Mega Code Archive

Categories
1) Android
2) ASP.Net
3) ASP.Net Tutorial
4) C
5) C Tutorial
6) C#
7) C# Book
8) C# by API
9) C# Tutorial
10) C++
11) C++ Tutorial
12) Delphi
13) Flash ActionScript
14) Flex
15) Java
16) Java Book
17) Java by API
18) Java Tutorial
19) JavaScript DHTML
20) JavaScript Reference
21) JavaScript Tutorial
22) MSOfficeExcel 2007 Tutorial
23) MSOfficePowerPoint 2007 Tutorial
24) MSOfficeWord 2007 Tutorial
25) MSSQL
26) MSSQL Tutorial
27) MySQL
28) MySQL Tutorial
29) Oracle PLSQL
30) Oracle PLSQL Tutorial
31) Perl
32) Php
33) PostgreSQL
34) Python
35) Python Tutorial
36) Ruby
37) Silverlight
38) VB.Net
39) VB.Net by API
40) VB.Net Tutorial
41) Visual C++ .NET
42) VisualBasic Script
43) XML
44) XML Tutorial
 
C#
1) 2D Graphics
2) ADO Database
3) Class Interface
4) Collections Data Structure
5) Components
6) Data Types
7) Date Time
8) Design Patterns
9) Development Class
10) Event
11) File Stream
12) Generics
13) GUI Windows Form
14) Internationalization
15) Language Basics
16) LINQ
17) Network
18) Office
19) Reflection
20) Regular Expressions
21) Security
22) Services Event
23) Thread
24) Web Services
25) Windows
26) WPF
27) XML
28) XML LINQ
Date Time
1) A simple clock
2) A summer UTC time vs a winter time
3) Add 2 month to the date time
4) Add Business Days
5) Add hours to a DateTime
6) Add milliseconds to DateTime
7) Add one week to the current date
8) Add the specified number of days to a DateTime
9) Add TimeSpan to a new DateTime
10) Add TimeSpan to DateTime
11) Add to year, month, week, day, hour, minute, second and millisecton
12) Add two DateTime value together
13) Add week to a DateTime
14) Adds a specified number of months to the current DateTimeOffset object
15) Adds a specified number of whole and fractional days to the current DateTimeOffset object
16) Adds a specified number of whole and fractional hours to the current DateTimeOffset object
17) Adds a specified number of years to the DateTimeOffset object
18) Adds a specified time interval to a DateTimeOffset object
19) ALL the patterns
20) Assume time is local during the parse
21) Assume time is UTC
22) Calculate date, based on specified time and unit
23) Calculation based on the TimeSpan
24) Calendar represents time in divisions, such as weeks, months, and years
25) Calendar ToDateTime is not culture aware
26) Change current culture and back
27) Check the Kind of DateTime
28) Choosing Between DateTime, DateTimeOffset, and TimeZoneInfo
29) Compare DateTime instance with Equal methods
30) Compare one DateTimeOffset with another object
31) Compare the results of choosing InvariantInfo with those of choosing CurrentInfo
32) Compare two DateTimeOffset values
33) Compare two DateTimeOffset values for equality
34) Compare two DateTimeOffset values for time and offset
35) Compares 2 dates ignoring the milliseconds
36) Compares current DateTimeOffset to a specified DateTimeOffset object and indicates the order
37) Compares two DateTimeOffset objects and indicates the order
38) Comparisons between DateTime objects
39) Constructors of DateTime
40) Contains helper for converting to and from the date formats
41) Convert DateTime to string with fr-FR culture
42) Convert DateTimeOffset to string with different culture information
43) Convert time from seconds to ticks
44) Convert TimeSpan in whole and fractional days
45) Convert To TimeSpan
46) Convert To TimeZone
47) Convert Unix Seconds
48) Converts a Coordinated Universal Time (UTC) to the time in a specified time zone
49) Converts a Date to a string using relative time
50) Converts a DateTime object into a unix timestamp number
51) Converts a time from one time zone to another
52) Converts a time from one time zone to another based on time zone identifiers
53) Converts a time to the time in a particular time zone
54) Converts DateTimeOffset to a DateTimeOffset value representing the Coordinated Universal Time (UTC)
55) Converts DateTimeOffset to local time
56) Converts DateTimeOffset to string using the specified culture-specific formatting information
57) Converts DateTimeOffset to string using the specified format
58) Converts DateTimeOffset to string using the specified format and culture-specific format information
59) Converts DateTimeOffset to string with ToString() method
60) Converts DateTimeOffset to the date and time specified by an offset value
61) Converts string to DateTimeOffset
62) Converts string to DateTimeOffset using the specified culture-specific format information
63) Converts string to DateTimeOffset using the specified culture-specific format information and formatting style
64) Converts string to DateTimeOffset using the specified format and culture-specific format information
65) Converts string to DateTimeOffset using the specified format, culture-specific format information, and style
66) Converts string to DateTimeOffset using the specified formats, culture-specific format information, and style
67) Converts string to TimeSpan
68) Converts string to TimeSpan by using the specified format and culture-specific format information
69) Converts the current date and time to Coordinated Universal Time (UTC)
70) Converts the date to end at midnight
71) Converts the date to start from midnight
72) Converts the file time to an equivalent local time
73) Converts the specified date and time strings to their DateTime equivalent representation
74) Converts time in a specified time zone to Coordinated Universal Time (UTC)
75) Converts TimeSpan to string using the specified format and culture-specific formatting information
76) Converts TimeSpan to string with default ToString
77) Converts TimeSpan to string with ToString() using the specified format
78) Create a DateTime structure with local time
79) Create a new TimeSpan to a specified number of days, hours, minutes, and seconds
80) Create a new TimeSpan to a specified number of hours, minutes, and seconds
81) Create a new TimeSpan to the specified number of ticks
82) Create a TimeSpan from units of ticks
83) Create a TimeSpan instance, specifying the days, hours, minutes, and seconds
84) Create a TimeSpan instance, specifying the days, hours, minutes, seconds, and milliseconds
85) Create a TimeSpan instance, specifying the hours, minutes, and seconds
86) Create a TimeSpan instance, specifying the number of ticks
87) Create a TimeSpan that represents a specified number of hours
88) Create a TimeSpan that represents a specified number of seconds
89) Create a TimeSpan to a specified number of days, hours, minutes, seconds, and milliseconds
90) Create date of 1132009 using Hijri calendar and get Day property from DateTime
91) Create DateTimeOffset from DateTime with TimeSpan
92) Create DateTimeOffset using the specified DateTime value
93) Create DateTimeOffset using the specified DateTime value and offset
94) Create DateTimeOffset using the specified number of ticks and offset
95) Create DateTimeOffset using the specified year, month, day, hour, minute, second, and offset
96) Create DateTimeOffset using the specified year, month, day, hour, minute, second, millisecond, and offset
97) Create DateTimeOffset using the specified year, month, day, hour, minute, second, millisecond, and offset of a specified calenda
98) Create day and year for a certain month
99) Create Expires In String
100) Create TimeSpan value from seconds
101) CultureInfo Provides information about a specific culture
102) Current date and time
103) Custom Date and Time Format Strings
104) Custom TimeSpan Format Strings
105) Date and time To Words
106) Date Time To String
107) DateTime and ==
108) DateTime and TimeSpan Instances
109) DateTime Compare
110) DateTime CompareTo
111) DateTime Format
112) DateTime Now and its calculation
113) DateTime Now, DateTime UtcNow, DateTime Today
114) DateTime to short and long String
115) DateTime ToString single letter format with fr-FR culture
116) DateTime ToString with CultureInfo
117) DateTime ToString(ddMMyyyy )
118) DateTime ToString(ddMMyyyy hh
119) DateTime(Int32, Int32, Int32, Calendar)
120) DateTimeFormatInfo AbbreviatedMonthGenitiveNames
121) DateTimeFormatInfo Class
122) DateTimeFormatInfo CurrentInfo TimeSeparator
123) DateTimeFormatInfo FullDateTimePattern
124) DateTimeFormatInfo LongDatePattern
125) DateTimeFormatInfo LongTimePattern
126) DateTimeFormatInfo MonthDayPattern
127) DateTimeFormatInfo RFC1123Pattern
128) DateTimeFormatInfo ShortDatePattern
129) DateTimeFormatInfo ShortTimePattern
130) DateTimeFormatInfo SortableDateTimePattern
131) DateTimeFormatInfo UniversalSortableDateTimePattern
132) DateTimeFormatInfo YearMonthPattern
133) DateTimeOffset custom format specifier
134) DateTimeOffset format
135) DateTimeOffset Greater Than Operator
136) DateTimeOffset Greater Than Or Equal Operator
137) DateTimeOffset Inequality Operator
138) DateTimeOffset Less Than Or Equal Operator
139) DateTimeOffset LessThan Operator
140) Default output of ToString() method
141) Default ToString output
142) Default value of DateTime is DateTime MinValue
143) Demonstrates culture formatting
144) Determines the specific cultures that use the Chinese language, and displays the parent culture
145) Determines whether the current TimeZoneInfo object and another TimeZoneInfo object are equal
146) Display the current date and time and show if they occur in daylight saving time
147) Display the Date, Day, DayOfWeek, DayOfYear,Ticks, and TimeOfDayProperties of myDateTime
148) Display the daylight saving time range for the current year
149) Display the names for standard time and daylight saving time for the local time zone
150) Display the properties for myTimeSpan
151) Displays the words Hello World! on the screen, along with the current date and time
152) Do some leap year checks
153) Duration data structure
154) Elapsed Time Today with TimeSpan
155) Estimates pi by throwing points into a square Use to compare execution times
156) Example of the TimeSpan relational operators
157) Find difference between Date Now and Date UtcNow
158) Find difference between Now and UtcNow using DateTimeOffset
159) Format a DateTime with Mddyyyy h
160) Format date value as short date format
161) Format decimal with different cultures
162) Format time and date information 1
163) Format time and date information 2
164) Format Time as ##
165) Format Time as ###### (2)
166) Full date long time format
167) Full date short time format
168) General date long time format
169) General dateshort time format
170) Generate the timestamp of the provided DateTime
171) Generate the UNIX style timestamp for DateTime UtcNow
172) Get a TimeSpan that represents a specified number of days
173) Get current time in UTC
174) Get Date Difference in String
175) Get Day Of Week
176) Get Elapsed Time
177) Get properties of TimeSpan
178) Get the current Coordinated Universal Time (UTC) and UTC offset
179) Get the quarter number for the DateTime
180) Get the week number
181) Get TimeZone Id, Display name, Standard name, and Daylight Name
182) Get UTC offset
183) Gets a DateTime value from DateTimeOffset
184) Gets a DateTime value that represents the Coordinated Universal Time (UTC) date and time from DateTimeOffset
185) Gets a DateTime value that represents the local date and time from DateTimeOffset
186) Gets a TimeZoneInfo object that represents the Coordinated Universal Time (UTC) zone
187) Gets a TimeZoneInfo object that represents the local time zone
188) Gets a value indicating whether the time zone has any daylight saving time rules
189) Gets current date and time with the local times offset from Coordinated Universal Time (UTC)
190) Gets hour from DateTimeOffset
191) Gets millisecond from DateTimeOffset
192) Gets minute from DateTimeOffset
193) Gets or sets a DateTimeFormatInfo that defines the culturally appropriate format of displaying dates and times
194) Gets second from DateTimeOffset
195) Gets the date component of this instance
196) Gets the date from Year and Month integer
197) Gets the date from Year integer
198) Gets the date from Year, Month and Day integer
199) Gets the day of the month from DateTimeOffset object
200) Gets the day of the week
201) Gets the day of the week from DateTimeOffset
202) Gets the days between
203) Gets the days in month
204) Gets the days in year
205) Gets the end of day
206) Gets the end of month
207) Gets the end of quarter
208) Gets the end of week
209) Gets the end of year
210) Gets the list of calendars that can be used by the culture
211) Gets the localized display name for the time zones standard time
212) Gets the localized general display name that represents the time zone
213) Gets the month from DateTimeOffset
214) Gets the months between
215) Gets the number of ticks from DateTimeOffset
216) Gets the ordinal suffix for a given date
217) Gets the pretty date
218) Gets the start of month
219) Gets the time difference between the current time zones standard time and Coordinated Universal Time (UTC)
220) Gets the time of day from DateTimeOffset
221) Gets the time zone identifier
222) Gets the times offset from Coordinated Universal Time (UTC)
223) Gets the value of TimeSpan in whole and fractional hours
224) Gets the value of TimeSpan in whole and fractional milliseconds
225) Gets the value of TimeSpan in whole and fractional minutes
226) Gets the value of TimeSpan in whole and fractional seconds
227) Gets year from DateTimeOffset
228) GregorianCalendar AddMonths
229) GregorianCalendar Class
230) GregorianCalendar Constructor
231) GregorianCalendar GetDayOfMonth
232) GregorianCalendar GetDaysInMonth
233) GregorianCalendar GetDaysInYear
234) GregorianCalendar GetMonthsInYear
235) GregorianCalendar GetWeekOfYear
236) GregorianCalendar IsLeapDay
237) GregorianCalendar IsLeapMonth
238) GregorianCalendar IsLeapYear
239) GregorianCalendar MaxSupportedDateTime
240) GregorianCalendarTypes Enumeration
241) How values you passed into contructor mapped to its Properties
242) Illustrates the use of DateTime and TimeSpan instances
243) Illustrates the use of TimeSpan properties and methods
244) Indicate format for TimeSpan parse
245) Initalize a time span to 99 days, 23 hours, 59 minutes, and 59 9999999 seconds
246) Initalize a timespan to 25 milliseconds
247) Initialize a time span to 1
248) Initialize a time span to 14 days
249) Initialize a time span to 250 milliseconds
250) Initialize a time span to zero
251) Initializes a DateTime structure to a specified number of ticks
252) Is Date valid
253) Is given DateTime Weekend
254) Is it an ambiguous time
255) Is valid local time
256) Long date format
257) Long time date format
258) Look at the min and max datetime values
259) Measures the time taken to add some numbers
260) Measuring the Time Taken to Add Some Numbers
261) Month date format
262) New DateTime(1900, 2, 29)
263) New DateTime(1900, 2, 29, new JulianCalendar())
264) New TimeSpan(2, 12, 0, 0)
265) Offset of DateTime
266) Output date and time using custom format specification
267) Output date using each standard datetime format specifier
268) Output DateTime object
269) Parse a date time value from a string with Invariant Culture
270) Parse a single number using the %h custom format string
271) Parse a single number using the c standard format string
272) Parse and convert to UTC
273) Parse and ParseExact
274) Parse date and time and convert to UTC
275) Parse date and time value, and allow all white space
276) Parse date and time with custom specifier
277) Parse date and time with offset without offsets minutes
278) Parse date-only value with invariant culture
279) Parse date-only value with invariant culture and assume time is UTC
280) Parse date-only value with leading white space
281) Parse date-only value without leading zero in month using d format
282) Parse DateTime from 201152 14
283) Parse days
284) Parse hour
285) Parse hours
286) Parse Rfc 2822 Date
287) Parse string to TimeSpan
288) Parse strings to TimeSpan
289) Predefined TimeSpan value
290) Request a specific culture (english language in Great Britain)
291) Retrieves a TimeZoneInfo object from the registry based on its identifier
292) Return a elapsed time in formatted string (hh
293) Return a unique identifier based on systems full date (yyyymmdd) and time (hhmissms)
294) Return the number of milliseconds since the Unix epoch (1 Jan , 1970 UTC) for a given DateTime value
295) Return the previous business date of the date specified
296) Return the previous or next business day of the date specified
297) Return true if the number of seconds has elapsed since the last check
298) Returns a new TimeSpan object whose value is the absolute value of the current TimeSpan object
299) Returns a TimeSpan that represents a specified number of milliseconds
300) Returns a TimeSpan that represents a specified number of minutes
301) Returns the Coordinated Universal Time (UTC) offset for the specified local time
302) Returns the Coordinated Universal Time (UTC) that corresponds to a specified time
303) Returns the daylight saving time period for a particular year
304) Returns the number of days in the specified month and year
305) Returns the number of seconds since January 1, 1970
306) RFC1123 date format
307) Screen for holidays
308) Short time date format
309) Show possible time zone for a DateTimeOffset
310) Sortable date format
311) Specify Kind DateTime
312) Sql format string to Date
313) Standard TimeSpan format
314) Standard TimeSpan Format String
315) Subtract 15 minutes from the current TimeSpan and print the result
316) Subtract one DateTime from another you get a TimeSpan
317) Subtracts a DateTimeOffset from another DateTimeOffset
318) Subtracts a time interval from DateTimeOffset
319) The GetDaylightChanges method returns specific daylight saving information for a given year
320) The Id property corresponds to the value passed to FindSystemTimeZoneById
321) The IsDaylightSavingTime and GetUtcOffset methods work as follows
322) The next example formats a DateTime with invariant culture Invariant culture is always the same, regardless of the computers set
323) The static TimeZone CurrentTimeZone method returns a TimeZone object based on the current local settings
324) The TimeZoneInfo class works in a similar manner TimeZoneInfo Local returns the current local time zone
325) Time String
326) TimeSpan calculations
327) TimeSpan format
328) TimeSpan Format with Flag
329) TimeSpan Parse(0
330) TimeSpan TicksPerDay
331) TimeZoneInfo also provides IsDaylightSavingTime and GetUtcOffset methods--the difference is that they accept either a DateTime o
332) To Date Time from dmtf date
333) To Four Digit Year
334) To Short Date Time
335) To Unix time
336) ToString single letter format
337) ToString()
338) Transition to DST in local time zone occurs on 3112007 at 2
339) Tries to converts a string to DateTimeOffset(String with date and offset )
340) Tries to converts a string to DateTimeOffset(String with date only)
341) Tries to converts a string to DateTimeOffset(String with date, time with AMPM designator, and offset)
342) Tries to converts a string to DateTimeOffset(String with day abbreviation)
343) Tries to converts a string to DateTimeOffset(String with time only)
344) Two Digit Year Max
345) Universal full datetime
346) Universal sortable date format
347) Update text within a file by replacing a substring within the file
348) Use FromDays(), FromHours(), FromMinutes(), FromSeconds(), FromMilliseconds(), and FromTicks() methods to create new TimeSpan in
349) Use the Add() method to add a TimeSpan instance to another
350) Use the Add() method to add a TimeSpan to a DateTime
351) Use the AddYears(), AddMonths(), AddDays(), AddMinutes(), and AddSeconds() methods to add periods to a DateTime
352) Use the Compare() method to compare DateTime instances
353) Use the DaysInMonth() method to retrieve the number of days in a particular month and year
354) Use the Duration() method to add two TimeSpan instances
355) Use the Equals() method to compare DateTime instances
356) Use the FromFileTime() method to convert an operating system file timestamp to a DateTime
357) Use the IsLeapYear() method to determine if a particular year is a leap year
358) Use the Negate() method to add two TimeSpan instances
359) Use the Now and UtcNow properties to get the currrent date and time
360) Use the overloaded addition operator (+) to add a TimeSpan to a DateTime
361) Use the overloaded less than operator () to compare two DateTime instances
362) Use the overloaded subtraction operator (-) to subtract a TimeSpan from a DateTime
363) Use the Parse() method to convert strings to DateTime instances
364) Use the Parse() method to convert strings to TimeSpan instances
365) Use the Subtract() method to subtract a TimeSpan from a DateTime
366) Use the Subtract() method to subtract a TimeSpan instance from another
367) Use the ToFileTime() method to convert a DateTime to an operating system file timestamp
368) Use the ToLongTimeString() and ToShortTimeString() methods to convert the time parts of a DateTime to long and short time string
369) Use the ToString() method to convert a DateTime to a string
370) Using the Hijri Calendar
371) Using the Persian Calendar
372) Week refers to the week of the month, with 5 meaning the last week
373) What day of the month is this
374) Whether a date and time falls in the range of daylight saving time
375) Whether a date and time in a time zone is ambiguous and can be mapped to two or more Coordinated Universal Time (UTC) times
376) Whether the specified date and time is within a daylight saving time period
377) Year date format
378) Zero TimeSpan